<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>获取表单值</title>
</head>
<body>
    <!-- <div id="get">
        <input type="text" v-model="information" @keyup.enter="set" @focus="area" @blur="today">
        <input type="button" value="确定" @click="sure">
        <ul>
            <li>{{information}}</li>
        </ul>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        var get=new Vue({
            el:"#get",
            data:{
                information:"请输入想要搜索的内容"
            },
            methods:{
                area:function(){
                    this.information=""
                },
                set:function(){
                    alert(this.information);
                },
                sure:function(){
                    this.information="你今天真好看"
                },
                today:function(){
                    if(this.information=="")
                    {
                        this.information="请输入想要搜索的内容"
                    }
                }
            }
        })
    </script> -->
    <div class="fabiao">
        <input type="text" v-model="comment" @keyup.enter="sure" placeholder="请输入你的想法">
        <input type="button" value="确定" @click="sure">
        <ul>
            <li v-for="it in arr">
                {{it}}
            </li>
        </ul>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        var fabiao=new Vue({
            el:".fabiao",
            data:{
                comment:"",
                arr:[],
                index:0
            },
            methods:{
                sure:function(){
                    this.arr.push(this.comment);
                    this.comment="";
                }
            }
        })
    </script>

</body>
</html>